namespace B.S.Data.MES.API.Models
{
    /// <summary>
    /// 科大讯飞API配置
    /// </summary>
    public class XunFeiConfig
    {
        /// <summary>
        /// 应用ID（WebSocket方式使用）
        /// </summary>
        public string AppId { get; set; } = string.Empty;
        
        /// <summary>
        /// API密钥（WebSocket方式使用）
        /// </summary>
        public string ApiKey { get; set; } = string.Empty;
        
        /// <summary>
        /// API密钥（WebSocket方式使用）
        /// </summary>
        public string ApiSecret { get; set; } = string.Empty;
        
        /// <summary>
        /// WebSocket基础URL
        /// </summary>
        public string BaseUrl { get; set; } = string.Empty;
        
        /// <summary>
        /// HTTP API URL - 新的科大讯飞开放平台API
        /// </summary>
        public string HttpApiUrl { get; set; } = "https://spark-api-open.xf-yun.com/v1/chat/completions";
        
        /// <summary>
        /// Bearer Token - 用于HTTP API认证
        /// </summary>
        public string BearerToken { get; set; } = string.Empty;
        
        /// <summary>
        /// 模型名称
        /// </summary>
        public string Model { get; set; } = "4.0Ultra";
        
        /// <summary>
        /// 领域（WebSocket使用）
        /// </summary>
        public string Domain { get; set; } = "generalv3";
        
        /// <summary>
        /// 最大token数
        /// </summary>
        public int MaxTokens { get; set; } = 4096;
        
        /// <summary>
        /// 温度参数
        /// </summary>
        public double Temperature { get; set; } = 0.5;
        
        /// <summary>
        /// Top-K参数
        /// </summary>
        public int TopK { get; set; } = 4;
        
        /// <summary>
        /// 是否启用流式响应
        /// </summary>
        public bool EnableStream { get; set; } = true;
        
        /// <summary>
        /// 请求超时时间（秒）
        /// </summary>
        public int TimeoutSeconds { get; set; } = 30;
    }
}

